Deduplication in Email Integration not working

Hi, I’m trying to integrate email with pagerduty. To avoid duplication of the alerts for the replies on the emails trying to use the deduplication feature. But somehow it is not working.

Below is the global event rule created

  • Route to *******
  • Extract (?:(?i)re: |fwd: )?(.*) from headers.subject to dedup_key
  • Extract (?:(?i)re: |fwd: )?(.*) from headers.subject to summary
  • Then stop processing

Not sure if I’m missing anything. Currently incidents are created for every email i.e. even for the replies on the email

Can you share an example full email subject that you’re trying to use? It’s more than likely your regex pattern. Try using regex101.com and the Golang flavor on the left menu and get what you need for deduplication and move that pattern to your rule.

Subject tested are
TestAlert for pagerduty
RE: TestAlert for pagerduty

Below is the alert details

Checked in https://regex101.com/ and there also it looks good.

Had given same regex mentioned in link https://support.pagerduty.com/docs/email-management-filters-and-rules

For the incident key, have the rule state: In the email subject, match this regular expression: (?:(?i)re: |fwd: )?(.*)

I tested with our early access “customize event fields” rule-setting and set the dedupe field using your regex and it worked as expected for “TestAlert for pagerduty” and Re: TestAlert for Pagerduty.

Rule configuration:

Resulting deduplication:

Thanks for the inputs.

How can we get this early access, to make it working for us. If not is there any alternative to make it work ? All we want is not to duplicate alerts for the emails when they are replied

Hey Siva,

We went over this in chat together and confirmed the issue was more tied to sending emails to the service-level email integration and wanting to use the global event rules.

We can follow this support article to deduplicate emails in service level integrations or switch to using the global email integration key instead.

Thanks for the inputs.

After switching over to service-level email integration rules it worked for us.